$OpenBSD: patch-src_gif2swf_c,v 1.2 2015/03/28 17:59:17 sthen Exp $

giflib 5.0+

--- src/gif2swf.c.orig	Wed Aug 12 12:57:28 2009
+++ src/gif2swf.c	Sat Mar 28 17:49:39 2015
@@ -230,13 +230,13 @@ TAG *MovieAddFrame(SWF * swf, TAG * t, char *sname, in
     }
     fclose(fi);
 
-    if ((gft = DGifOpenFileName(sname)) == NULL) {
+    if ((gft = DGifOpenFileName(sname, NULL)) == NULL) {
         fprintf(stderr, "%s is not a GIF file!\n", sname);
         return t;
     }
 
     if (DGifSlurp(gft) != GIF_OK) {
-        PrintGifError();
+        fprintf(stderr, "giflib error: %s in %s\n", GifErrorString(gft->Error), sname);
         return t;
     }
 
@@ -455,7 +455,7 @@ TAG *MovieAddFrame(SWF * swf, TAG * t, char *sname, in
 
     free(pal);
     free(imagedata);
-    DGifCloseFile(gft);
+    DGifCloseFile(gft, NULL);
 
     return t;
 }
@@ -488,7 +488,7 @@ int CheckInputFile(char *fname, char **realname)
     }
     fclose(fi);
 
-    if ((gft = DGifOpenFileName(s)) == NULL) {
+    if ((gft = DGifOpenFileName(s, NULL)) == NULL) {
         fprintf(stderr, "%s is not a GIF file!\n", fname);
         return -1;
     }
@@ -499,7 +499,7 @@ int CheckInputFile(char *fname, char **realname)
         global.max_image_height = gft->SHeight;
 
     if (DGifSlurp(gft) != GIF_OK) { 
-        PrintGifError();
+        fprintf(stderr, "giflib error: %s\n", GifErrorString(gft->Error));
         return -1;
     }
     // After DGifSlurp() call, gft->ImageCount become available
@@ -518,7 +518,7 @@ int CheckInputFile(char *fname, char **realname)
             fprintf(stderr, "frame: %u, delay: %.3f sec\n", i + 1, getGifDelayTime(gft, i) / 100.0);
     }
 
-    DGifCloseFile(gft);
+    DGifCloseFile(gft, NULL);
 
     return 0;
 }
